<script>
    var xhr = new XMLHttpRequest();
    xhr.open('POST', 'test.php?a=1&b=2');
    xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    xhr.send('c=3&d=4');
  </script>